<div >
    <form class="form-horizontal" role="form" novalidate name="stForm" >
        <div class="form-ctrl md-whiteframe-z1">
            <div class="form-search" style="height:170px;" ng-class="{true: 'shou'}[shoumun==0]" >
                <div>
                    <label style="width:70px">业务</label>
                    <md-select multiple ng-model="translate.businessCode" >
                        <md-select-label>
                            {{translate.businessCode.length ? _getNames(translate.businessCode,'businessName',businessTypes) :'全部'}}
                        </md-select-label>
                        <md-option ng-value="" ng-click="_checkAll(translate,'provinceCode')">全部</md-option>
                        <md-option ng-value="business" ng-repeat="business in businessTypes">{{business.businessName}}</md-option>
                    </md-select>
                </div>
                <div>
                    <md-input-container flex>
                        <label >开始时间</label>
                        <input  type="date" time-validate ='day' end-time = 'translate.endTime'  ng-model="translate.startTime"  name = 'dateStartTime' required>
                        <div ng-messages="stForm.dateStartTime.$error">
                          <div ng-message="date">请正确输入时间</div>
                          <div ng-message="time-error">{{errorInfo.startTime[0]}} </div>
                          <div ng-message="too-great">{{errorInfo.startTime[1]}}</div>
                        </div>
                    </md-input-container >
                </div>
                <div>
                    <md-input-container flex>
                        <label >结束时间</label>
                        <input name="dateEndTime" type="date" time-validate ='day' start-time="translate.startTime" ng-model="translate.endTime"   required>
                        <div ng-messages="stForm.dateEndTime.$error">
                          <div ng-message="date">请正确输入时间</div>
                          <div ng-message="time-error">{{errorInfo.endTime[0]}} </div>
                          <div ng-message="too-great">{{errorInfo.endTime[1]}}</div>
                        </div>
                    </md-input-container >
                </div>
                <div class="menus" style = 'padding-top:35px'>
                    <md-button style="height:35px;width:50px " ng-click = 'resetValue()'  class="md-raised">重置</md-button>
                </div>

            </div>
            <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show = 'flagObj&&!stForm.$invalid' ng-click="shoumun=1"></i>
            <md-button ng-click="queryBusiness()" ng-disabled= 'stForm.$invalid' ng-click="shoumun==1?shoumun=0:shoumun=1" class="md-fab md-primary md-hue-1" ng-disabled ='stForm.$invalid' aria-label="Profile">
                <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;" ng-show="shoumun==0"></i>
                <i class="glyphicon glyphicon-search" ng-show="shoumun==1"></i>
            </md-button>
        </div>
    </form>
    <div class="table-info">
        <div class="menus">
           <form action="{{exportUrl}}" target="_black" method="post" style="display: initial;">
               <input type="hidden" value="{{outData}}"  name="data" />
               <md-button  type="submit"  class="md-raised">导出Excel</md-button>
           </form>
            <md-button class="md-raised" style="background-color: #FF9800;color:white" ng-click="flag=1">表数据</md-button>
            <md-button class="md-raised" style="background-color: #FF9800;color:white" ng-click="flag=2">业务成功率</md-button>
            <md-button class="md-raised" style="background-color: #FF9800;color:white" ng-click="flag=3">业务交易笔数</md-button>
        </div>
        <div ng-show ='flag==1'>
            <div>
                <div style="text-align: center">
                    <h3 style="margin-top:0;font-size:large;font-weight:bold;color:black">{{startTime}} 至{{endTime}}业务详情统计</h3>
                </div>
                <div class="table-detail">
                    <div class="t_r">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th width="10%">业务名称</th>
                                <th width="10%">业务编码</th>
                                <th width="10%">业务笔数</th>
                                <th width="15%">成功业务笔数</th>
                                <th width="10%">业务成功率</th>
                                <th width="10%">统计开始时间</th>
                                <th width="10%">统计结束时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="business in businessData">
                                <td width="10%" >{{business.businessName}}</td>
                                <td width="10%" >{{business.businessCode}}</td>
                                <td width="10%" >{{business.businessCount}}</td>
                                <td width="10%" >{{business.succeedBusiness}}</td>
                                <td width="10%" >{{business.successRate}}%</td>
                                <td width="10%" >{{startTime}}</td>
                                <td width="10%" >{{endTime}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

            </div>

        </div>
        <div ng-show='flag===2'>
            <div id = 'pbossRate' style='height:550px;padding-bottom:20px'> </div>
        </div>
        <div ng-show='flag===3'>
            <div id = 'pbossNum' style='height:550px;'> </div>
        </div>

    </div>
</div>
